<h3><?= Yii::t('module_user','Register'); ?></h3>

<div class="form">

<? $form=$this->beginWidget('CActiveForm', array(
	'id'=>'register-form',
	'enableClientValidation'=>true,
	'enableAjaxValidation'=>true,
	'clientOptions'=>array(
		'validateOnSubmit'=>true,
	),
	'htmlOptions'=>array(
		'class' => 'form-horizontal',
	)
)); ?>

	<div class="control-group">
		<?= $form->labelEx($model,'username', array("class"=>"control-label")); ?>
		<div class="controls">
			<?= $form->textField($model,'username',array('size'=>60,'maxlength'=>128,"class"=>"input-xlarge")); ?>
			<?= $form->error($model,'username'); ?>
		</div>
	</div>
	
	<div class="control-group">
		<?= $form->labelEx($model,'email', array("class"=>"control-label")); ?>
		<div class="controls">
			<?= $form->textField($model,'email',array('size'=>60,'maxlength'=>128,"class"=>"input-xlarge")); ?>
			<?= $form->error($model,'email'); ?>
		</div>
	</div>

	<div class="control-group">
		<?= $form->labelEx($model,'password', array("class"=>"control-label")); ?>
		<div class="controls">
			<?= $form->passwordField($model,'password',array('size'=>60,'maxlength'=>128,"class"=>"input-xlarge")); ?>
			<?= $form->error($model,'password'); ?>
		</div>
	</div>

	<div class="control-group">
		<?= $form->labelEx($model,'password_repeat', array("class"=>"control-label")); ?>
		<div class="controls">
			<?= $form->passwordField($model,'password_repeat',array('size'=>60,'maxlength'=>128,"class"=>"input-xlarge")); ?>
			<?= $form->error($model,'password_repeat'); ?>
		</div>
	</div>
	
	<? if(CCaptcha::checkRequirements()): ?>
	<div class="control-group">
		<?= $form->labelEx($model,'verifyCode', array("class"=>"control-label")); ?>
		<div class="controls">
			<? $this->widget('CCaptcha'); ?>
			<br/>
			<?= $form->textField($model,'verifyCode',array("class"=>"input-xlarge")); ?>
			<div class="help-block">
				<?= tt('Please enter the letters as they are shown in the image above.'); ?><br/>
				<?= tt('Letters are not case-sensitive.'); ?>
			</div>
			<?= $form->error($model,'verifyCode'); ?>
		</div>
	</div>
	<? endif; ?>
	
	<div class="form-actions">
		<?= CHtml::submitButton($model->isNewRecord ? Yii::t('common', 'Create') : Yii::t('common', 'Save'), array("class"=>"btn btn-primary")); ?>
	</div>

<? $this->endWidget(); ?>

</div><!-- form -->